<!DOCTYPE html>
<html>
<body>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpChildFrames();
    testRunner.waitUntilDone();
    testRunner.dumpBackForwardList();
}

onpageshow = function()
{
    if (sessionStorage.didNav) {
        delete sessionStorage.didNav;
        delete sessionStorage.topShouldNavAndGoBack;
        if (window.testRunner)
            testRunner.notifyDone();
    } else {
        sessionStorage.topShouldNavAndGoBack = true;
        document.getElementById('the-form').submit();
    }
}
   
</script>  

<p>Tests that a POST targetted to a frame is handled correctly when navigating away and coming back to the page.</p>

<form id="the-form" method="POST" action="resources/form-target.pl" target="target-frame">
  <input name="the-input" value="input value goes here">
</form>

<iframe name="target-frame" src="about:blank"></iframe>
</body>
</html>
